package com.example.viewmodelstudio.lifeclcycle_service;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.location.Location;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.example.viewmodelstudio.R;

public class MainActivity2 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        Log.d("zdl", "======onCreate========");
//        GetPositioningUtils.getInstance().getContext(this).getLocation(location -> {
//            Log.d("zdl", "==================" + location.toString());
//        });
    }

    public void startGps(View view) {
        startService(new Intent(this, MyLicationService.class));
    }

    public void stopGps(View view) {
        stopService(new Intent(this, MyLicationService.class));
    }
}